load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "keys",
    srcs = [
        "constants.go",
        "doc.go",
        "errors.go",
        "keys.go",
        "printer.go",
        "printer_fuzz.go",
        "spans.go",
        "sql.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/keys",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/util/encoding",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
    ],
)

go_test(
    name = "keys_test",
    size = "small",
    srcs = [
        "keys_test.go",
        "printer_test.go",
        "sql_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":keys"],
    deps = [
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/testutils",
        "//pkg/util/bitarray",
        "//pkg/util/duration",
        "//pkg/util/encoding",
        "//pkg/util/keysutil",
        "//pkg/util/leaktest",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_apd_v3//:apd",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
        "@com_github_stretchr_testify//require",
    ],
)
